package com.ehotting.edsta.diagnosisPredict.feign;

import com.ehotting.eaf.core.web.domain.diagnosisPredict.PageDto;
import com.ehotting.eaf.core.web.domain.diagnosisPredict.Response;
import com.ehotting.edsta.diagnosisPredict.domain.dto.AlgoTemplate;
import com.ehotting.edsta.diagnosisPredict.feign.factory.AlgoTemplateFileFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 算法模板feignClient
 */
@FeignClient(name = "AlgoTemplateFile", url = "${request.url.prefix}/algoTemplateFile", fallbackFactory = AlgoTemplateFileFallbackFactory.class)
public interface AlgoTemplateFileFeignService {
    /**
     * 算法列表
     *
     * @return
     */
    @GetMapping(value = "/pageList")
    Response<PageDto<AlgoTemplate>> pageList(
            @RequestParam("algoname") String algoname,
            @RequestParam("bucketDir") String bucketDir,
            @RequestParam("counts") Integer counts,
            @RequestParam("createTime") String createTime,
            @RequestParam("creater") String creater,
            @RequestParam("fileaslias") String fileaslias,
            @RequestParam("filename") String filename,
            @RequestParam("id") Long id,
            @RequestParam("iteminfoId") Long iteminfoId,
            @RequestParam("language") String language,
            @RequestParam("packageaslias") String packageaslias,
            @RequestParam("packagename") String packagename,
            @RequestParam("packageurl") String packageurl,
            @RequestParam("purpose") String purpose,
            @RequestParam("remarks") String remarks,
            @RequestParam("status") String status,
            @RequestParam("version") String version,
            @RequestParam("page") Long page,
            @RequestParam("pageSize") Long pageSize
    );

    /**
     * 单个/批量删除
     *
     * @return
     */
    @PostMapping(value = "/deleteByIds")
    Response<String> deleteByIds(@RequestParam("ids") String ids);

    /**
     * 算法浏览
     *
     * @return
     */
    @GetMapping(value = "/getById")
    Response<AlgoTemplate> getById(@RequestParam("id") Long id);
}